Optimal. Leaf size=34 \[ \frac {\sec ^5(x)}{5 a}-\frac {\tan ^3(x)}{3 a}-\frac {\tan ^5(x)}{5 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.08, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.462, Rules used = {3957, 2918,
2686, 30, 2687, 14} \begin {gather*} -\frac {\tan ^5(x)}{5 a}-\frac {\tan ^3(x)}{3 a}+\frac {\sec ^5(x)}{5 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 30
Rule 2686
Rule 2687
Rule 2918
Rule 3957
Rubi steps
\begin {align*} \int \frac {\sec ^4(x)}{a+a \csc (x)} \, dx &=\int \frac {\sec ^3(x) \tan (x)}{a+a \sin (x)} \, dx\\ &=\frac {\int \sec ^5(x) \tan (x) \, dx}{a}-\frac {\int \sec ^4(x) \tan ^2(x) \, dx}{a}\\ &=\frac {\text {Subst}\left (\int x^4 \, dx,x,\sec (x)\right )}{a}-\frac {\text {Subst}\left (\int x^2 \left (1+x^2\right ) \, dx,x,\tan (x)\right )}{a}\\ &=\frac {\sec ^5(x)}{5 a}-\frac {\text {Subst}\left (\int \left (x^2+x^4\right ) \, dx,x,\tan (x)\right )}{a}\\ &=\frac {\sec ^5(x)}{5 a}-\frac {\tan ^3(x)}{3 a}-\frac {\tan ^5(x)}{5 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(85\) vs. \(2(34)=68\).
time = 0.15, size = 85, normalized size = 2.50 \begin {gather*} -\frac {-240+54 \cos (x)+32 \cos (2 x)+18 \cos (3 x)+16 \cos (4 x)-96 \sin (x)+18 \sin (2 x)-32 \sin (3 x)+9 \sin (4 x)}{960 a \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )^3 \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^5} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(86\) vs.
\(2(28)=56\).
time = 0.12, size = 87, normalized size = 2.56
method | result | size |
risch | \(\frac {4 i \left (6 i {\mathrm e}^{3 i x}+15 \,{\mathrm e}^{4 i x}+2 i {\mathrm e}^{i x}-2 \,{\mathrm e}^{2 i x}-1\right )}{15 \left ({\mathrm e}^{i x}-i\right )^{3} \left (i+{\mathrm e}^{i x}\right )^{5} a}\) | \(59\) |
default | \(\frac {-\frac {1}{6 \left (\tan \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {1}{4 \left (\tan \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {3}{8 \left (\tan \left (\frac {x}{2}\right )-1\right )}-\frac {1}{\left (\tan \left (\frac {x}{2}\right )+1\right )^{4}}+\frac {2}{5 \left (\tan \left (\frac {x}{2}\right )+1\right )^{5}}+\frac {4}{3 \left (\tan \left (\frac {x}{2}\right )+1\right )^{3}}-\frac {1}{\left (\tan \left (\frac {x}{2}\right )+1\right )^{2}}+\frac {3}{8 \left (\tan \left (\frac {x}{2}\right )+1\right )}}{a}\) | \(87\) |
norman | \(\frac {-\frac {2 \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{3 a}-\frac {2}{5 a}-\frac {2 \left (\tan ^{6}\left (\frac {x}{2}\right )\right )}{a}-\frac {6 \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{5 a}-\frac {4 \tan \left (\frac {x}{2}\right )}{5 a}-\frac {4 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{3 a}+\frac {16 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{15 a}}{\left (\tan \left (\frac {x}{2}\right )+1\right )^{5} \left (\tan \left (\frac {x}{2}\right )-1\right )^{3}}\) | \(88\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 167 vs.
\(2 (28) = 56\).
time = 0.27, size = 167, normalized size = 4.91 \begin {gather*} \frac {2 \, {\left (\frac {6 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {9 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac {8 \, \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {5 \, \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}} + \frac {10 \, \sin \left (x\right )^{5}}{{\left (\cos \left (x\right ) + 1\right )}^{5}} + \frac {15 \, \sin \left (x\right )^{6}}{{\left (\cos \left (x\right ) + 1\right )}^{6}} + 3\right )}}{15 \, {\left (a + \frac {2 \, a \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {2 \, a \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac {6 \, a \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {6 \, a \sin \left (x\right )^{5}}{{\left (\cos \left (x\right ) + 1\right )}^{5}} + \frac {2 \, a \sin \left (x\right )^{6}}{{\left (\cos \left (x\right ) + 1\right )}^{6}} - \frac {2 \, a \sin \left (x\right )^{7}}{{\left (\cos \left (x\right ) + 1\right )}^{7}} - \frac {a \sin \left (x\right )^{8}}{{\left (\cos \left (x\right ) + 1\right )}^{8}}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.10, size = 45, normalized size = 1.32 \begin {gather*} -\frac {2 \, \cos \left (x\right )^{4} - \cos \left (x\right )^{2} - {\left (2 \, \cos \left (x\right )^{2} + 1\right )} \sin \left (x\right ) - 4}{15 \, {\left (a \cos \left (x\right )^{3} \sin \left (x\right ) + a \cos \left (x\right )^{3}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\sec ^{4}{\left (x \right )}}{\csc {\left (x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 75 vs.
\(2 (28) = 56\).
time = 0.40, size = 75, normalized size = 2.21 \begin {gather*} -\frac {9 \, \tan \left (\frac {1}{2} \, x\right )^{2} - 12 \, \tan \left (\frac {1}{2} \, x\right ) + 7}{24 \, a {\left (\tan \left (\frac {1}{2} \, x\right ) - 1\right )}^{3}} + \frac {45 \, \tan \left (\frac {1}{2} \, x\right )^{4} + 60 \, \tan \left (\frac {1}{2} \, x\right )^{3} + 70 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 20 \, \tan \left (\frac {1}{2} \, x\right ) + 13}{120 \, a {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}^{5}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.30, size = 69, normalized size = 2.03 \begin {gather*} -\frac {2\,\left (15\,{\mathrm {tan}\left (\frac {x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {x}{2}\right )}^5+5\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4-8\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+9\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2+6\,\mathrm {tan}\left (\frac {x}{2}\right )+3\right )}{15\,a\,{\left (\mathrm {tan}\left (\frac {x}{2}\right )-1\right )}^3\,{\left (\mathrm {tan}\left (\frac {x}{2}\right )+1\right )}^5} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________